package com.yingxin.yxerp.module.dingtalk.entity.enums;

/**
 * 户口类型
 */

public enum WeComHouseholdRegistrationType {

    ONE(1,"本地城镇"),
    TWO(2,"本地农村"),
    THREE(3,"外地城镇（省内）"),
    FOUR(4,"外地农村（省内）"),
    Five(5,"外地城镇（省外）"),
    SIX(6,"外地农村（省外）");

    private Integer type;

    private String typeName;

    WeComHouseholdRegistrationType(Integer type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static WeComHouseholdRegistrationType getEnum(Integer type) {
        if(  type == null ){
            return null;
        }
        for (WeComHouseholdRegistrationType i : WeComHouseholdRegistrationType.values()) {
            if ( i.getType() == type ) {
                return i;
            }
        }
        return null;
    }

}
